#ifndef _CONTROL_TASK_H_
#define _CONTROL_TASK_H_

#include "tim.h"
#include "receive_can.h"
#include "push.h"
#include "pitch.h"
#include "yaw.h"
#include "shoot.h"
#include "referee.h"
#include "referee_usart_task.h"
#include "alg_fsm.h"
#include "gpio.h"
#include "set_value.h"
#include "key.h"


typedef struct
{
    Dart_Fric_t     dart_fric;
    Dart_Push_t     dart_push;
    Dart_Yaw_t      dart_yaw;
    Dart_Pitch_t    dart_pitch;
    Key_struct      key;

    uint8_t dart_launch_order;
    uint8_t current_mode;
    uint8_t can_tx_cmd;

} Chariot;
extern Chariot chariot;

extern uint8_t ID;
extern uint8_t Start_Flag;

void Task_Init(Chariot* chariot);
void Set_Dart_Parameter(Chariot *chariot, uint8_t DART_ID, uint8_t FRIC_STATUS, uint8_t PUSH_CMD,uint8_t CAN_TX_CMD);
void Dart_FSM_TIM_Status_PeriodElapsedCallback(Chariot *chariot);
#endif
